<div class="panel panel-default" id="showServers" style=" overflow: auto;">

	<p class="navbar-form" style="width:100%;margin-bottom:10px;">
        <div class="input-group" style="padding:10px;">
                <input type="text" class="form-control searchValue" placeholder="搜索任意关键字" style="width:100%;" >
                <span class="input-group-btn" >
                        <button class="btn btn-success">
                                <span class="glyphicon glyphicon-search">搜索</span>
                        </button>
                </span>
        </div>
       </p>
    <div class="panel-heading" style="z-index: 1;background: white;">
        <button class="btn btn-success btn-xs" id="createServer" type="button"><span
                class="glyphicon glyphicon-plus "></span></button>
        <button class="btn btn-xs btn-info" type="button" id="batchAddServers"><span
                class="glyphicon glyphicon-plane"></span></button>

        <button class="btn btn-xs  btn-danger" type="button" id="batchDeleteServers"><span
                class="glyphicon glyphicon-trash"></span></button>
    </div>


    <table class="table table-hover table-striped  table-bordered  table-condensed  table-responsive "  >
        <thead>
        <tr id="serverOptions">
            <th style="color: black;cursor:pointer " id="selectAllServers">
                <i class=" glyphicon glyphicon-unchecked "></i>
            </th>
            <th>IP</th>
            <th>别名</th>
            <th>属主</th>
            <th>主机组</th>
            <th>用户名</th>
            <th>登录方式</th>
            <th>密码</th>
            <th>秘钥</th>
            <th>秘钥密码</th>
            <th>端口</th>
            <th>sudo</th>
            <th>sudo密码</th>
            <th>su</th>
            <th>su密码</th>
            <th>状态</th>
            <th>备注</th>
            <th style="min-width: 60px;">操作</th>
        </tr>
        </thead>
        <tbody id="serversConfigTbody">


        </tbody>

    </table>
</div>


<!--编辑框-->
<div  style="overflow: auto;z-index: 1004;width:auto;height: 100%;position: fixed;left: -100%;right: 0px;top: -120%;bottom: 0px;display:block;" id="editServerConfigTable">
    <div class="modal "
         style="overflow:hidden;overflow-y:hidden;position:relative;left:0px;right:0px;bottom:0px;top:0px;margin:auto;display:block;">
        <div class="modal-dialog">
            <div class="modal-content  ">
                <div class="modal-header" style="cursor: move;">

                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

                    <h4 class=" glyphicon glyphicon-edit " style="color: green;">编辑服务器配置</h4>
                </div>

                <div class="modal-body" id="editBody" >
                    <div class="input-group col-md-12" style="margin-top: 10px">
                        <!--IP-->
                        <div class="input-group-addon "  style="width: 17%">IP</div>
                        <input id="ip" class=" form-control "  style="width: 100%" >
                    </div>
                    <div class="input-group col-md-12" style="margin-top: 10px">
                        <!--别名，需要检查是否重复-->
                        <div class="input-group-addon "  style="width: 17%">别名</div>
                        <input id="alias" class=" form-control "  style="width: 100%" >
                    </div>
                    <div class="input-group col-md-12" style="margin-top: 10px">
                        <!--属主-->
                        <div class="input-group-addon "  style="width: 17%">属主</div>
                        <div class="btn-group" style="width: 100%;">
                            <select id="owner" class="form-control">

                            </select>


                        </div>
                    </div>
                    <div class="input-group col-md-12" style="margin-top: 10px">
                        <!--主机组-->
                        <div class="input-group-addon "  style="width: 17%">主机组</div>
                        <input  id="group" class=" form-control "  style="width: 100%" >
                    </div>
                    <div class="input-group col-md-12" style="margin-top: 10px">
                        <!--用户名-->
                        <div class="input-group-addon "  style="width: 17%">用户名</div>
                        <input  id="username" class=" form-control "  style="width: 100%" >
                    </div>
                    <div class="input-group col-md-12" style="margin-top: 10px">
                        <!--登录方式-->
                        <div class="input-group-addon "  style="width: 17%">登录方式</div>
                        <div class="btn-group" style="width: 100%;">
                            <select class="form-control" id="loginMethod">
                                <option value="PASSWORD">PASSWORD</option>
                                <option value="KEY">KEY</option>
                            </select>

                        </div>
                    </div>
                    <div class="input-group col-md-12" id="passwordDiv" style="margin-top: 10px">
                        <!--密码-->
                        <div class="input-group-addon "  style="width: 17%">密码</div>
                        <input  id="password" type="password" class=" form-control "  style="width: 100%;" >
                    </div>
                    <div class="input-group col-md-12"  id="keyfileDiv" style="display:none;margin-top: 10px">
                        <!--秘钥-->
                        <div  class="input-group-addon "  style="width: 17%">秘钥</div>
                        <div class="btn-group" style="width: 100%;">
                            <select id="keyfile" class="form-control">

                            </select>
                        </div>
                    </div>
                    <div class="input-group col-md-12"  id="keyfilePasswordDiv" style="display:none;margin-top: 10px">
                        <!--秘钥密码-->
                        <div  class="input-group-addon "  style="width: 17%">秘钥密码</div>
                        <input  type="password" id="keyfilePassword" class=" form-control "  style="width: 100%" >
                    </div>

                    <div class="input-group col-md-12" style="margin-top: 10px">
                        <!--端口-->
                        <div class="input-group-addon "  style="width: 17%">端口</div>
                        <input type="number"  id="port" value="22" class=" form-control "  style="width: 100%" >
                    </div>
                    <div class="input-group col-md-12" style="margin-top: 10px;cursor:pointer">
                        <!--sudo-->
                        <div id="sudo"  class="input-group-addon "  style="width: 17%">
                            <i id="sudo"  class="glyphicon glyphicon-unchecked"></i>
                            <span>sudo</span>
                        </div>
                        <input disabled   type="password" id="sudoPassword" class=" form-control "  style="width: 100%" >
                    </div>

                    <div class="input-group col-md-12" style="margin-top: 10px;cursor:pointer">
                        <!--su-->
                        <div id="su" class="input-group-addon "  style="width: 17%">
                            <i id="su" class="glyphicon glyphicon-unchecked"></i>
                            <span>su</span>
                        </div>
                        <input  disabled id="suPassword"  type="password"  class=" form-control "  style="width: 100%" >
                    </div>

                    <div class="input-group col-md-12" style="margin-top: 10px">
                        <!--备注-->
                        <div class="input-group-addon "  style="width: 17%">连接节点</div>
                        <span  class="form-control"  style="height:auto;;min-height: 34px;"  id="linkDevice"></span>
                    </div>


                    <div class="input-group col-md-12" style="margin-top: 10px">
                        <!--备注-->
                        <div class="input-group-addon "  style="width: 17%">备注</div>
                        <input  id="description" class=" form-control "  style="width: 100%" >
                    </div>



                </div>
                <div class="modal-footer">
                    <button style="float:left" type="button" class="btn btn-default" data-dismiss="modal" id="closeEditServer">取消</button>
                    <button type="button" style="float:right" class="btn btn-success" data-dismiss="modal" id="saveServerConfig">保存</button>
                </div>
            </div>
        </div>
    </div>
</div>












<div  style="position: fixed;left: 0px;right: 0px;top: 0px;bottom: 10%;margin: auto;display:none ;z-index: 1004;" id="batchServerDiv">

    <div class="modal "
         style="height: 95%;overflow:hidden;overflow-y:hidden;position:relative;left:0px;right:0px;bottom:0px;top:0px;margin:auto;display:block;">
        <div class="modal-dialog">
            <div class="modal-content  ">
                <div class="modal-header" style="cursor: move;">

                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

                    <h4 class=" glyphicon glyphicon-success  glyphicon glyphicon-info-sign " >批量创建服务器</h4>
                </div>


                <div class="modal-body">
			<textarea id="batchCreateServers" class="form-control" style="font-family:华文;color:white;background:#293038;letter-spacing:2px;height:300px;;"></textarea>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success" data-dismiss="modal" id="createServers">创建</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal" id="closeBatchDiv">取消</button>
                </div>
            </div>
        </div>
    </div>
</div>





<div  style="z-index: 10004;width:auto;height: 200px;position: fixed;left: 0px;right: 0px;top: 40%;bottom: 60%;margin: auto;display:none;" id="showServerCheckInfo">
    <div class="modal "
         style="overflow:hidden;overflow-y:hidden;position:relative;left:0px;right:0px;bottom:0px;top:0px;margin:auto;display:block;">
        <div class="modal-dialog">
            <div class="modal-content  ">
                <div class="modal-header" style="cursor: move;">

                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

                    <h4 class=" glyphicon glyphicon-success  glyphicon glyphicon-info-sign " >主机检测信息</h4>
                </div>


                <div class="modal-body">

                    <div     class="col-md-12  col-sm-12 col-xs-12 col-lg-12  input-group">
                        <div class="col-md-12  col-sm-12 col-xs-12 col-lg-12 "  style="border-bottom: 1px solid #b0b0b0;margin-top:10px;">
                            <label class="control-label col-md-2 col-lg-2 col-sm-4 col-xs-3">主机</label>
                            <div  id="showCheckHost"  class="col-md-10 col-lg-10 col-xs-9 col-sm-10"></div>
                        </div>
                        <div class="col-md-12 col-sm-12 col-xs-12 col-lg-12 " style="border-bottom: 1px solid #b0b0b0;margin-top:10px;">
                            <label class="control-label col-md-2 col-lg-2 col-sm-4 col-xs-3 ">时间</label>
                            <div  id="showCheckTime"  class="col-md-10 col-lg-10 col-xs-9 col-sm-10"></div>
                        </div>
                        <div class="col-md-12 col-sm-12 col-xs-12 col-lg-12 " style="border-bottom: 1px solid #b0b0b0;margin-top:10px;">
                            <label class="control-label col-md-2 col-lg-2 col-sm-4 col-xs-3">状态</label>
                            <div   id="showCheckStatus" class="col-md-10 col-lg-10 col-xs-9 col-sm-10"></div>
                        </div>
                        <div class="col-md-12 col-sm-12 col-xs-12 col-lg-12 " style="margin-top:10px;">
                            <label class="control-label col-md-2 col-lg-2 col-sm-4 col-xs-3">信息</label>
                            <div  id="showCheckInfo" style="word-wrap: break-word;word-break:break-all;"  class="col-md-10 col-lg-10 col-xs-9 col-sm-10"></div>
                        </div>
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default"  id="closeCheckInfo">关闭</button>
                </div>
            </div>
        </div>
    </div>
</div>


<script src="../js/servers.js"></script>
